package com.ibm.mall.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ibm.mall.dao.FeedBackDao;
import com.ibm.mall.model.Feedback;
import com.ibm.mall.model.PageBean;
import com.ibm.mall.service.FeedbackService;
import com.ibm.mall.util.QueryHelper;

@Service
@Transactional
public class FeedbackServiceImpl implements FeedbackService {
	
	
	@Resource
	private FeedBackDao feedbackDao;

	@Override
	public void saveFeedback(Feedback model) {
		// TODO Auto-generated method stub
		feedbackDao.save(model);

	}

	@Override
	public void deleteFeedback(Integer id) {
		// TODO Auto-generated method stub
		feedbackDao.delete(id);

	}


	@Override
	public List<Feedback> findAll(Feedback feedback) {
		// TODO Auto-generated method stub
		return feedbackDao.findAll();
	}

	@Override
	public PageBean getPageBean(int pageNum, int pageSize,
			QueryHelper queryHelper) {
		// TODO Auto-generated method stub
		return feedbackDao.getPageBean(pageNum, pageSize, queryHelper);
	}

	@Override
	public Feedback getFeedbackById(Integer id) {
		// TODO Auto-generated method stub
		return feedbackDao.getById(id);
	}

	@Override
	public void updateFeedback(Feedback model) {
		// TODO Auto-generated method stub
		feedbackDao.update(model);
		
	}

}
